package com.nice.demo.test;//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//


import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;


public class ZuotiHandScrollView extends ScrollView {
    private static final String TAG = "ZuotiHandScrollView";
    public static final int TAG_TOUCH = 0;
    public static final int TAG_PEN = 1;
    private ZuotiHandScrollView.HandScrollViewCallback callback;

    public ZuotiHandScrollView.HandScrollViewCallback getCallback() {
        return this.callback;
    }

    public void setCallback(ZuotiHandScrollView.HandScrollViewCallback callback) {
        this.callback = callback;
    }

    public ZuotiHandScrollView(Context context) {
        super(context);
    }

    public ZuotiHandScrollView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public ZuotiHandScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @SuppressLint({"NewApi"})
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        int toolType = ev.getToolType(0);
        if (toolType == 2) {
            if (HandWritingViewHelper.DEBUG) {
                XHLog.i("ZuotiHandScrollView", "onInterceptTouchEvent() >>> toolType == TOOL_TYPE_STYLUS", new Object[0]);
            }

            if (this.callback != null) {
                this.callback.back(1, (Object)null);
            }

            return false;
        } else {
            if (this.callback != null) {
                this.callback.back(0, (Object)null);
            }

            return super.onInterceptTouchEvent(ev);
        }
    }

    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);
        if (HandWritingViewHelper.DEBUG) {
            XHLog.i("ZuotiHandScrollView", "changed = [" + changed + "], l = [" + l + "], t = [" + t + "], r = [" + r + "], b = [" + b + "]", new Object[0]);
        }

    }

    public interface HandScrollViewCallback {
        void back(int var1, Object var2);
    }
}
